package com.controller.zk;

import com.bean.zk.Log;
import com.service.zk.LogService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class LogController {

    @Resource
    private LogService logService;

    @RequestMapping(value = "/page/getlogs")
    @ResponseBody
    public List<Log>  get(){
        return logService.getAllLogs();
    }


    @RequestMapping(value = "/page/logreback/{lid}")
    @ResponseBody
    public int  reback(@PathVariable String lid){
        return logService.reback(lid);
    }
}
